Gate admin design system by inbox access - #1439
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The route guard does not normalize trailing-slash paths, allowing unauthorized /design-system/ requests to receive the admin shell instead of a 404.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This pull request gates the admin Design System by the existing inbox allowlist and centralizes case-insensitive principal matching.
Changes:
- Shares
INBOX_USERSmatching across web and admin surfaces. - Adds admin permission bootstrap and route/navigation gating.
- Expands tests for permissions, routing, and allowlist behavior.
| File | Summary |
|---|---|
plugins/web-ui/test/inbox-source.test.ts |
Tests shared inbox allowlist usage. |
plugins/web-ui/server/index.ts |
Reuses the shared matcher. |
plugins/chassis/src/principal-allowlist.ts |
Provides reusable principal matching. |
plugins/admin/test/whoami.test.ts |
Tests permission bootstrap. |
plugins/admin/test/principal-allowlist.test.ts |
Tests normalization and the all override. |
plugins/admin/test/default-view.test.ts |
Tests client-side route gating. |
plugins/admin/test/branding.test.ts |
Tests authorized and denied routes. |
plugins/admin/src/index.ts |
Adds permissions and server route authorization. |
plugins/admin/public/index.html |
Gates Design System navigation and client routing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved route authorization, permission preservation, and admin configuration findings block approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (1)
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Configure INBOX_USERS for standalone admin deployments and preserve existing admin permissions.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1

Changes
/design, and trailing-slash routes return not found.INBOX_USERSmatcher across the web inbox/calendar surfaces and the admin surface, including the existingalloverride. Register it once as an optional operator secret for both components so supported deployments inject the same private value without committing addresses.Screenshots
Risk assessment